package com.rem.designPattern.factory工厂方法.simpleFactory;

/**
 * @author Rem
 * @date 2022-11-14
 */
public class Client {
    public static void main(String[] args) {

        CoffeeStore store = new CoffeeStore();

        //简单工厂创建咖啡
        Coffee coffee = store.orderCoffee("american");
        System.out.println(coffee.getName());

        //静态工厂创建咖啡
        Coffee latte = store.orderCoffee2("latte");
        System.out.println(latte.getName());
    }
}